<template>
    <div class="top">
            商品名称：
            <input type="text" v-model="mc">
            商品价格：
            <input type="text" v-model="jg">
        <button @click="tj">添加商品</button>
    </div>
</template>
<script>
export default {
  data() {
    return {
      mc: "",
      jg: ""
    };
  },
  methods: {
    tj() {
      this.$emit("tj", { mc: this.mc, jg: this.jg });
      this.mc=''
      this.jg=''
    }
  }
};
</script>
<style lang="scss" scoped>
</style>


